<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "activity".
 *
 * @property int $act_id 自增ID
 * @property int $merchant_id 商户ID
 * @property string $act_name 活动名称
 * @property int $type 类型:1现金减免,2折扣
 * @property float $min_amount 最低金额
 * @property string $content 活动值
 * @property string $start_time 开始时间
 * @property string $end_time 结束时间
 *
 * @property Merchant $merchant
 */
class Activity extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'activity';
    }

    /**
     * Gets query for [[Merchant]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getMerchant()
    {
        return $this->hasOne(Merchant::className(), ['merchant_id' => 'merchant_id']);
    }
}
